﻿@model FCNS.ERP.Models.ErpPxOrder

@{
    ViewBag.Title = "学员报名-编辑";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@ViewBag.Title</h2>
<link href="~/Content/Combo/combo.select.css" rel="stylesheet" />
<script src="~/Scripts/Combo/jquery.combo.select.js"></script>

<script>
    $(document).ready(function () {
        $("#CorSId").comboSelect(); 

        $("#PxPlanId").change(function () {
            $.get("/Px/PxPlanPriceGet", {
                id: $("#PxPlanId").val()
            },
                function (data, status) {
                    if (status == "success") {
                        $("#Money").val(data);
                    }
                });
        }); 
    });
</script>
@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
<div class="form-horizontal">
    <hr />
    @Html.ValidationSummary(true, "", new { @class = "text-danger" })
    @Html.HiddenFor(model => model.Id)
    @Html.HiddenFor(model => model.PxOrderStatus)
    @Html.HiddenFor(model => model.OrderNO)

    <div class="form-group">
        @Html.LabelFor(model => model.PxPlanId, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.DropDownList("PxPlanId", ViewData["PxPlan"] as SelectList, htmlAttributes: new { @class = "form-control" })
            @Html.ValidationMessageFor(model => model.PxPlanId, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.CorSId, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.DropDownList("CorSId", ViewData["CorS"] as SelectList, htmlAttributes: new { @class = "form-control" })
            @Html.ValidationMessageFor(model => model.CorSId, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.KQId, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.EditorFor(model => model.KQId, new { htmlAttributes = new { @class = "form-control", @Min = "1" } })
            @Html.ValidationMessageFor(model => model.KQId, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        @Html.LabelFor(model => model.Money, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.EditorFor(model => model.Money, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.Money, "", new { @class = "text-danger" })
        </div>
    </div>

    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <input type="submit" value="保存" class="btn btn-default" />
        </div>
    </div>
</div>
}

<div>
    <a class="backToListImg" href="/Px/PxOrder">返回</a>
</div>
